class utility{
	
	/**
	 * Takes an array, a, and remove 'rem'
	 * @param a the original array
	 * @param rem the element to remove
	 * @return the array with the rem removed	 */
	public static function arrayRemove(a:Array, rem):Array{
		for(var i = 0; i < a.length; i++){
			if(a[i] == rem)
				a.splice(i, 1);
			else if (a[i].length > 0)
				arrayRemove(a[i], rem);
		}
		
		return a;
	}
}